import { base } from '@/config'
import http from '@/utils/request'

// 管理员模块
const admin = {
  getList: params => {
    return http.get(`${base.system}/manager/getList`, params)
  },
  getDetail: id => {
    return http.get(`${base.system}/manager/getDetail/${id}`)
  },
  add: params => {
    return http.postJson(`${base.system}/manager/add`, params)
  },
  update: params => {
    return http.postJson(`${base.system}/manager/update`, params)
  },
  delete: id => {
    return http.post(`${base.system}/manager/delete/${id}`)
  },
  updatePassword: params => {
    return http.postJson(`${base.system}/manager/password`, params)
  },
  updateFrozen: params => {
    return http.postJson(`${base.system}/manager/updateFrozen`, params)
  }
}

export default admin
